package cn.itcast.erp.service.impl;

import cn.itcast.erp.dao.mapper.OrderDetailReturnMapper;
import cn.itcast.erp.entity.Returnorderdetail;
import cn.itcast.erp.entity.Returnorders;
import cn.itcast.erp.service.OrderDetailReturnService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 采购退货详情Service接口
 *
 * @author 崔凯铭, 罗宇航
 * @date 2019/6/12
 */

@Service("orderDetailReturn")
public class OrderDetailReturnServiceImpl implements OrderDetailReturnService {

    @Resource
    private OrderDetailReturnMapper orderDetailReturnMapper;

    @Override
    public int insertOrderDetail(Returnorderdetail returnorderdetail) {
        if (returnorderdetail != null) {
            int i = this.orderDetailReturnMapper.insertOrderDetail(returnorderdetail);
            return i;
        }
        return -1;
    }

    @Override
    public List<Returnorderdetail> findOrderDetail(Returnorders returnorders) {
        return this.orderDetailReturnMapper.findOrderDetail(returnorders);
    }
}
